using System;
using System.Collections.Generic;

namespace EFCoreEnterpriseDemo.Models
{
    public class Order : BaseEntity
    {
        public string? OrderNumber { get; set; }
        public int UserId { get; set; }
        public decimal TotalAmount { get; set; }
        public string Status { get; set; } = "Pending";
        public DateTime OrderDate { get; set; } = DateTime.UtcNow;

        // 导航属性
        public virtual User? User { get; set; }
        public virtual ICollection<OrderItem> Items { get; set; } = new List<OrderItem>();
    }
}